{temp('admin/head')}

</head>
<body class="page-body">	
		{temp('admin/left')}
			{temp('admin/top')}
			
			<!-- Basic Setup -->
			<div class="panel panel-default">
				<div class="panel-heading">
					<h3 class="panel-title">{$tit}</h3>
				</div>
				<div class="panel-body">
							
					<table id="example" class="table table-striped table-bordered" cellspacing="0" width="100%">
						<thead>
							<tr>
								<th>ID</th>
								<th>套餐名称</th>
								<th>价格</th>
								<th>可发布职位数</th>
								<th>可下载职位数</th>
							</tr>
						</thead>
					
						<tbody class="middle-align">
							{if(@$r)}
							{foreach($r as $k=>$v)}
							<tr>
								<td>{$v['id']}</td>
								<td><input type="text" class="form-control" id="name_{$v['id']}" value="{$v['name']}" onchange="xgmc({$v['id']},1)" /></td>
								<td><input type="text" class="form-control" id="mon_{$v['id']}" value="{$v['money']}" onchange="xgmc({$v['id']},2)" /></td>
								<td><input type="text" class="form-control" id="kfb_{$v['id']}" value="{$v['kfb']}" onchange="xgmc({$v['id']},3)" /></td>
								<td><input type="text" class="form-control" id="kxz_{$v['id']}" value="{$v['kxz']}" onchange="xgmc({$v['id']},4)" /></td>
							</tr>
							{/foreach}
							{/if}
						</tbody>
					</table>
				</div>
			</div>

		{temp('admin/foot')}
	<!-- Imported styles on this page -->
	<script>
	function xgmc(id,type){
		if(type == 1){
			var name = $('#name_'+id).val();  
		}else if(type == 2){
			var money = $('#mon_'+id).val();  
		}else if(type == 3){
			var kfb = $('#kfb_'+id).val();  //名称
		}else if(type == 4){
			var kxz = $('#kxz_'+id).val();  //名称
		}
		
		$.post('{$_url}/admin/?act=xitong&met=tcsz_sck{$gnpd}',{id:id,name:name,money:money,kfb:kfb,kxz:kxz},function(data){
			if(data == 'cg'){
				location.href = '{$_url}/admin/?act=xitong&met=tcsz{$gnpd}';
			}else{
				alert(data);
			}
		});
	}
	</script>
	<!-- Bottom Scripts -->
	<script src="{$adstyle}/js/bootstrap.min.js"></script>
	<script src="{$adstyle}/js/TweenMax.min.js"></script>
	<script src="{$adstyle}/js/resizeable.js"></script>
	<script src="{$adstyle}/js/joinable.js"></script>
	<script src="{$adstyle}/js/xenon-api.js"></script>
	<script src="{$adstyle}/js/xenon-toggles.js"></script>
	<script src="{$adstyle}/js/datatables/js/jquery.dataTables.min.js"></script>

	<link rel="stylesheet" href="{$adstyle}/js/select2/select2.css">
	<link rel="stylesheet" href="{$adstyle}/js/select2/select2-bootstrap.css">
	<script src="{$adstyle}/js/select2/select2.min.js"></script>


	<!-- JavaScripts initializations and stuff -->
	<script src="{$adstyle}/js/xenon-custom.js"></script> 

</body>
</html>